package com.sdwz.borrow.client;

import com.sdwz.borrow.entity.UserInfo;
import com.sdwz.commonutil.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-user")
@Repository
public interface UserClient {
    /**
     * 删除书架书籍
     * @param bookIds
     * @return
     */
    @DeleteMapping("/api/user/auth/shelf/removeByBookIds/{userId}")
    public void delShelfBooksByBookIds(@PathVariable("userId") String userId, @RequestBody List<String> bookIds);


    @GetMapping("/admin/user/getUser/{userId}")
    public UserInfo getUser(@PathVariable("userId") String userId);
}
